package server;

public class LagouServlet1 extends HttpServlet {
    @Override
    public void doGet(Request request, Response response){
        /*try {
            Thread.sleep(100000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        String context = "<h1>LagouServlet-1 get</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(context.getBytes().length)+context);
        }catch (Exception e){
            e.printStackTrace();
        }

    }

    @Override
    public void doPost(Request request, Response response) {

        String context = "<h1>LagouServlet-1 post</h1>";
        try {
            response.output(HttpProtocolUtil.getHttpHeader200(context.getBytes().length)+context);
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    @Override
    public void init() throws Exception {

    }

    @Override
    public void destory() throws Exception {

    }
}
